#include <iostream>
#include <vector>

using namespace std;

int direction[4][2] = {{0,  1},
                       {0,  -1},
                       {-1, 0},
                       {1,  0}};

void bfs(vector<vector<int>> &mat, int &max) {

}

int main() {
    int n, m, k;
    cin >> n >> m >> k;
    vector<vector<int>> bomb(n, vector<int>(m));
    vector<vector<int>> b2(k, vector<int>(2));
    for (int i = 0; i < k; ++i) {
        int a, b;
        cin >> a >> b;
        bomb[a][b] = 1;
        b2[i][0] = a;
        b2[i][1] = b;
    }

    int si, sj, di, dj;
    cin >> si >> sj >> di >> dj;

    // 权重
    vector<vector<int>> mat(n, vector<int>(m, 0));
    for (int l = 0; l < k; ++l) {
        vector<int> z = b2[l];
        for (int i = 0; i < n; ++i) {
            for (int j = 0; j < m; ++j) {
                int des = abs(z[0] - i) + abs(z[1] - j);
                mat[i][j] += des;
            }
        }
    }

    return 0;
}
